import {$post} from '@/puigins/request.js'
export default {
	refreshUser({state}){
		let data=window.localStorage.getItem('qqLoginData')
		if(data!=null){
			$post('/user/qqLogin',JSON.parse(data)).then(res=>{
				console.log("res",res)
				if(res.code==200){
					state.user=res.data
					window.localStorage.setItem('user',JSON.stringify(res.data))
				}
			})
		}
	}
}